blob: a73f0f32f73984fded45849d8b273bd5c5f1649f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { notFound } from "next/navigation";
import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks";
import { api } from "@/server/api/client";
import { TRPCError } from "@trpc/server";
export default async function FeedPage(props: {
params: Promise<{ feedId: string }>;
}) {
const params = await props.params;
let feed;
try {
feed = await api.feeds.get({ feedId: params.feedId });
} catch (e) {
if (e instanceof TRPCError) {
if (e.code == "NOT_FOUND") {
notFound();
}
}
throw e;
}
return (
<Bookmarks
query={{ rssFeedId: feed.id }}
showDivider={true}
showEditorCard={false}
header={<div className="text-2xl">{feed.name}</div>}
/>
);
}
|